package com.cx.mall.common.model.order;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 订单中所包含的商品
 * </p>
 *
 * @author lyt
 * @since 2025-07-14
 */
@Getter
@Setter
@TableName("order_detail")
public class OrderDetail implements Serializable {

    private static final long serialVersionUID = 1L;

      @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 订单id
     */
    @TableField("order_id")
    private String orderId;

    /**
     * 销售价格
     */
    @TableField("price")
    private BigDecimal price;

    /**
     * 购买数量
     */
    @TableField("quantity")
    private Integer quantity;

    /**
     * 商品SKU_ID
     */
    @TableField("sku_id")
    private Long skuId;

    /**
     * 商品名称
     */
    @TableField("sku_name")
    private String skuName;

    /**
     * 图片地址
     */
    @TableField("image")
    private String image;

    /**
     * 金额合计
     */
    @TableField("amount")
    private BigDecimal amount;
}
